package com.test.proxy.staticproxy;

//代理类实现接口
public class SmsProxy implements SmsService {
    //代理对象
    private final SmsService smsService;

    public SmsProxy(SmsService smsService){
        this.smsService = smsService;
    }
    @Override
    public String send(String message) {
        //增强方法的实现
        System.out.println("发送信息前...");
        smsService.send(message);
        System.out.println("发送信息后...");
        return null;

    }
}
